<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('rigthCenterDiv','${ctx}/finance/chargePriceSchedule/index')">收费系数列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('rigthCenterDiv','${ctx}/finance/chargePriceSchedule/form')">收费系数添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<form:form id="searchForm" modelAttribute="chargePriceSchedule"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/finance/chargePriceSchedule/index');" method="post" class="form-inline">
                                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                    <label>费别：</label>
                                    <form:select path="chargeType" htmlEscape="false" class="form-control"  maxlength="64" >
                                        <form:options items="${fns:getDictList('CHARGE_TYPE_DICT')}"  itemLabel="label" itemValue="value"  htmlEscape="false"/>
                                    </form:select>
                                    <label>收费项目：</label>
                                    <form:input path="itemCode"  htmlEscape="false" class="form-control"  maxlength="100" ></form:input>
                                    <label>优惠类型：</label>
                                    <form:select path="priceCoeffType" class="form-control"  maxlength="2" >
                                        <form:option value="0">折扣</form:option>
                                        <form:option value="1">减免</form:option>
                                    </form:select>
                                  <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                </form:form>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
                            <thead>
                                <tr>
                                        <th>费别</th>
                                        <th>收费项目编码</th>
                                        <th>收费项目名称</th>
                                        <th>优惠类型</th>
                                        <th>减免金额</th>
                                        <th>收费折扣</th>
                                        <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="chargePriceSchedule">
                                <tr>
                                        <td> ${fns:getDictLabels(chargePriceSchedule.chargeType, 'CHARGE_TYPE_DICT', '')}</td>
                                        <td> ${chargePriceSchedule.itemCode}</td>
                                        <td> ${chargePriceSchedule.itemName}</td>
                                        <td> <c:if test="${chargePriceSchedule.priceCoeffType=='0'}">折扣</c:if>
                                             <c:if test="${chargePriceSchedule.priceCoeffType=='1'}">减免</c:if>
                                        </td>
                                        <td> ${chargePriceSchedule.priceCoeffDreate}</td>
                                        <td> ${chargePriceSchedule.priceCoeffMolecular}/${chargePriceSchedule.priceCoeffDenominator}</td>
                                    <td>
                                        <a href="#" onclick="loadDiv('rigthCenterDiv','${ctx}/finance/chargePriceSchedule/form?id=${chargePriceSchedule.id}')" class="btn btn-success btn-xs">修改</a>
                                        <a href="#"  class="applyBt btn btn-danger btn-xs" onclick="confirmExtend('确认要删除该收费系数吗？',function(){delLoad('mainCenterDiv','${ctx}/finance/chargePriceSchedule/delete?id=${chargePriceSchedule.id}','${ctx}/finance/chargePriceSchedule/index')})">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>

                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>